﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using chatc_server.database_methods;
using shared_libs;

namespace chatc_server.main
{
    
    public class Server_interface : MarshalByRefObject, IServer_interface
    {
        private ICom_Methods com;
        public Server_interface()
        {
            com = Com_Methods.getInstance();
        }
        public Boolean addNewUser(String username, String password)
        {
            return com.addNewUser(username, password);
                        
            
        }

        public Boolean logon(String username, String password, IMessageReciever MsgRecClient)
        {
            return com.logon(username, password, MsgRecClient);
        }

        public void sendMessage(String FromUser, String Message) {
            com.sendMessage(FromUser, Message);
        }
        public string getOnlinePeople()
        {
            return com.getOnlineList();
        }


        

    }
}
